package com.cloudea.learn.exception;

import static com.cloudea.learn.exception.DimensionException.dimensionToString;

/**
 * 索引出错时的异常
 * @author cloudea
 * @date 2021/12/28
 */
public class TensorIndexException extends RuntimeException {

    public TensorIndexException(int[] input, int[] allowed){
        super(String.format("Tensor索引出现错误：期输入%s，允许: %s",
                dimensionToString(input),
                dimensionToString(allowed)));
    }
}
